package com.mhgis.dog.server;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;


@Repository
public interface DogRepository extends JpaRepository<Dog, Long> {
	 @SuppressWarnings("unchecked")
	Dog save(Dog dog);
	
	 @Query(value = "select * from dog limit 0,18", nativeQuery = true)
	 List<Dog> findAll();
	 
	 @Query(value = "select next value for MYCATSEQ_GLOBAL; ", nativeQuery = true)
	 Long getNewID();
}


